package org.dromara.netbar.domain.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import org.dromara.netbar.domain.NetbarAutoGrant;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;


/**
 * 自动发放策略视图对象 netbar_auto_grant
 *
 * @author Lion Li
 * @date 2025-07-10
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = NetbarAutoGrant.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class NetbarAutoGrantVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 策略ID
     */
    @ExcelProperty(value = "策略ID")
    private Long autoGrantId;

    /**
     * 发放名称
     */
    @ExcelProperty(value = "发放名称")
    private String grantName;

    /**
     * 发放类型：1=礼包
     */
    @ExcelProperty(value = "发放类型：1=礼包")
    private Long grantType;

    /**
     * 关联礼包ID
     */
    @ExcelProperty(value = "关联礼包ID")
    private Long giftPackId;

    @ExcelProperty(value = "是否有效(1-有效 2-无效)")
    private Long status;

    /**
     * 发放次数限制（0=无限次）
     */
    @ExcelProperty(value = "发放次数限制", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0==无限次")
    private Long methodCount;

    /**
     * 单次充值最低金额（>=此金额触发）
     */
    @ExcelProperty(value = "单次充值最低金额", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = ">==此金额触发")
    private Long minRechargeAmount;

    /**
     * 礼包信息
     */
    private NetbarGiftPackVo giftPack;
}
